package com.guaoran.consul.services.provider.controller;

import com.guaoran.consul.services.api.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : 孤傲然
 * @description : hello
 * @date :2019/11/22 15:11
 */
@RestController
public class HelloController {
    @Autowired
    private HelloService helloService;

    @GetMapping("/hello")
    public String hello(){
        System.out.println("hello");
        return helloService.sayHello();
    }
    @GetMapping("/word")
    public String word(){
        System.out.println("word");
        return helloService.sayWord();
    }
    @GetMapping("/message")
    public String message(String message){
        System.out.println("message");
        return helloService.say(message);
    }
}
